package Aug21;

import javax.swing.*;

class SwingDemo {
		
	SwingDemo(){
			
			JFrame jfrm = new JFrame("Java Frame Sample");
			jfrm.setSize(350,350);
			jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			JLabel jlab = new JLabel("Swing is used for better GUI");
			jfrm.add(jlab);
			jfrm.setVisible(true);
		}
		
		public static void main(String args[]){
			SwingUtilities.invokeLater(new Runnable(){
				public void run(){
					new SwingDemo();
				}
			});
		}

	}


